{% extends 'base.html' %}
{% block title %}
    Login
{% endblock %}

{% block content %}
    <h1>Login</h1>
    {% if form.errors %}
        <p>
            Your username and password didn't match.
            Please try again.
        </p>
    {% else %}
        <p>Please, use the following form to log-in:</p>
    {% endif %}

    <div class="login-form">
        <form action="{% url 'account:login' %}" method="post">
            {{ form.as_p }}
            {% csrf_token %}
            <input type="hidden" name="next" value="{{ next }}">
            <p><input type="submit" value="Log-in"></p>
        </form>
        <p><a href="{% url 'account:password_reset' %}">Forgotten your password?</a></p>
    </div>
{% endblock %}